fixed bug with select