bugfix for pie