fixed a crash