Fixed NPE when saving was aborted