fixed small bug with Entity