fix ptolemy