bug fix for g++