Fixed configuration issues when saving to file