Tweak to get doInput() to work correctly