Fixes #1, save/restore was broken