fix #10

Event callbacks (onbefore/onafter/on<EVENT>) will now trigger when the
state does not change.