Fixed wait key thing

Passing it 5 makes it wait 5 milliseconds and then move on. On the mac,
passing it nothing just made it hang forever. Hoping this works on
fedora.