bugfix of candy=nil;