Update session_save function

Fix for session_save function so session can be saved.