Fix notification bug

Fix when user doesn't have valid keys.
Fix missing variable.