fix a bug in the grain size change at phase transitions