null pointer avoidance

Please do not use variable shortcuts. ( use f.e. variablename `temporaryScript` instead of `tmpScript` )