fix return code, fixes double messages