fixed some bugs with creating esx entities