retcode fixes