fixing preview tooltip when url is too long

Fixing preview tooltip when URL is too long. It's working now for url's that are short and long.