Replace -1 ret code