Fix #952 by encoding metadata for notifications

Fix #952 by encoding metadata for notifications