Fix pie crash #78 #96 #80 #45