fixed nasty bug in entity state validation
interim commit