Fix bugs with Select