fix broken SD card code