Fixed a problem when we had Entities objects in more than 3 levels.