fixes error when showing tooltip