fixed some bugs in disconnectRow;