Fixed warning messages
Fixed bug in chemical formula generator