Fixing bugs working on savestates