Figured out the problem, put in an if statement

The problem is that when the mouse doesn't move, inputNum doesn't
get changed back to null. Just realized that now. Perhaps I can
do a less hacky way than the if statement.
Fixes other things, like scrolling value calculations