Some fixes on code integration routines.