fix crash after SAVE command.

I've identified this line cause the crash in `make test`, but i'm not sure why it's there, so you better give it a review.