Fixed crash but need to change later.