fixed debug code and string for not array in the order by var