Fixed a crash caused by a typo