fixed a few bugs with new format