Hover event handler correctly working