session check script bug