Fix ECC specific code