fixed doSave() error.  fixed nullPointerexception error.