fixed problems with entities mapping