Fix resCode