send return code as soon as possible