Fix selects

Fixes #827