fix for kbhit(0)

do not allow negative numbers to pass to select