fixes for gcc/linux