On rear brake pads five important points to remember.
1 Make sure that the "nipple" (or locating pin) engages into one of the cutouts on the piston. Do this by ensuring the the cutouts are vertical and horizontal...but always check the nipple is sitting inside one of these cut outs.
2 I think both pads normally have this "nipple" but one pad has a wear indicator spring. This PAD goes on the piston side.
3 Before refitting piston always ensure the pads are free to slide in the stainless shims in the pad carrier with little, if any, force. If not thoroughly clean the calipers under the shims, and polish the shims, before applying some copperslip, or similar. Never file the pads to make them fit!!!
4 After fitting, pump the brakes to take up clearance before applying handbrake.
5 Make sure handbrake mechanism is released, and that the lever has returned fully back without sticking. Should be less than 1mm from the end stop.