correction of kbhit function (long delay)