make sure formatting is idempotent. closes #44