When I prepare sodium perborate by mixing sodium hydroxide with metaborate ($\ce{NaBO}$) and hydrogen peroxide and cooling it I applied a test to it by acidifying it with $\ce{HCl}$ and adding $\ce{KMnO4}$. A precipitate appeared and it turned black. What is the reason?
I tested another sample of sodium perborate by acidifying it with $\ce{NH4Cl}$ and after that KI and this turned white. Again, why?