backported older resets from Rails pipeline