fixed last row issue