added support for new version of the event manager
added support for 404 pages
added some checks for 404 page