Add additional protections when dealing with source ranges.
Correct typo in variable name resulting in missing part of the commandline