fixed bug in tooltip positioning