Fixed the DataType version of the potbelly algorithm