Fix sparkline crash