fixed gcc build problems