Fixed save logic