fixed a typo in the select() emulation code