Added gradient limiter. It is not tested.