Fixes a couple of bugs related to multiple selects.