some fixes for gcc