Fixed an unintended crash