Fixed lastFrame not updating. Added input debug.