Fixed bug inkey stream generator