Fixes unselect/select bug.