bugfix for null pointer issue of mmc.c