fix row extraction