Fixed tooltip position calculation