fixed gcc-specific compile erorrs