Fixed sd update bug