Fixed alignment bug in periodic mindist routine.