Fixing variable reference on notification creation