Added RCODE check