Fix algorithm case