fixed some format bugs