fix installation script bug related to return codes