Fixed enemy freezing and potential crash problems