Save current value compare it for edge callback
Fix typo