Fix for agro and custom entitys