Fixed a problem related to the order in which the header files are included.