Fix off by one in row removal code