fixes for gcc build