fixed pie bug