Whisk together the flour, baking powder, baking soda, cornflour, and salt. Set aside. In a separate large bowl, whisk together the melted butter and sugars until combined. Add the egg, vanilla, and peanut butter, and mix until combined. Add the dry ingredients, and mix until just combined. Fold in the M&M's.