Sequential gradient-restoration algorithm for optimal control problems