It could have been possibly a glitch, or the fact that another user(s) upvoted the question and the answer while you were doing so, as the page doesn't refresh upvotes/downvotes while you navigate through it, unless you do an action to refresh it (Flag, up/down vote, etc)