bugs in deleteNode fixed