Fix manage script return code