Added support for save state