Fixes and implements deselecting