fix bug in remove row