minor bug and format fix