fixed a bug in slot unassignment.