fixed bug of pie