fixed bug in how events were accessing html content