Fixed session timeout bug