Fix pseudo code