Solving a bug while saving