fixed a bug in run and exec that was crashing the code when checking if compilation had errors or not