Fixed comprate calc in the MAX branch