better event variables handling fixes #218