Need to fix residuals plot not updating after switching tabs