fix a bug, but still crash