Implemented additional plan repairing test, fixed plan repairing.
All tests succeed