Fixed crash bug