Fix the gup code