Bug in outputting formation energy and chem potential solved