fixes bugs with jquery buttons on the piece index