Fix reference inside of callbacks being document instead of the element it was applied to. This also effected delegated listeners