fix save option handling
add tests