More fixes in the implementation to support GCC compiler