fixed a crash in gcc