Added solution to offset problem for mouse event coordinates