fixed gcc compile issues