some changes due to Entities module optimization