Fix psuedocode