Fixed crash bug
Fixed typo of enum