fixed bug in entity position