Fix bug #3787. Create tooltip i helper function