Issue #5 - fixed with select() to be sure. Unnoticeable bug fixed.