fixed entities bug