fix save/open

code review