a bug in formation energy