fix bug of Pegasos