Fixed translation and ICP looping bugs