fixed template errors in compute_ss_residual