Some minor changes for gcc compability