Fixes #4 The ZAP plan does not finish correctly