Fixed bug in RPMD contractions