in the work
imported changes from lwworker
bugfix in event validation