minor fixes for gcc build