rebase #99 to fix assertion at first pie