Fix a few selection bugs
Merge branch 'hw3'