fixing up new residual keys