bugfix, event variable missuse