sd-if and minor fixes