Trying to fix bug in castep geom optimiser.