Fixed crash in select()