fix unterminated string literal
fix scheduler running even after lock