fixed hit test to be more accurate