fix GCC issue on ADVANCED_MODE compilation