Fix NPE

Signed-off-by: Jack Huey kitskub@gmail.com
Cleanup up SaveState

Signed-off-by: Jack Huey kitskub@gmail.com