Changed the code for displaying the tooltip