fixed several problems with save_restore not working from python code / plugins