Fixing tooltip content function