Fix fromValue from being set to NaN

fromValue would be NaN on some small changes.
fromValue was being added as a string, not a number.
This patch solves this issue.
I haven't updated the minified version.