bug fixes for source map scanning and auto source map gen