Fix change replyCode if errors