Didn't check return value of select

select can return false.