Verification and mitigation of ion migration in perovskite solar cells