Add backpatching of ret code