fixed undef _G.scheduler crash
Merge branch 'stable' into dev