fix a crash problem