Fix the implementation to be supported by GCC compiler