When number of displacements for 1st atom is greater than 1, it didn't work. Fixed.