Fix scripts return codes