Fix hovercards

I might have just fixed #4716. Works fine on my dev server but it would be great if someone could test it on another server.