Some entity fixes