fix bug in pullup code