Fixed script execution to be synchronous with the tests execution