Fix running external scripts