Algorithm correction