Some fixes for gcc