Fix session error, and save() function.