Prolog math  bug fix.
Update namespace in event.
Namespace update in pattern.
Little bug fixes.