Fix for exitCode not working with scenarios