fix case where lines returned objects of wrong type