fixed a crash :(