Legend works properly on mobile