fix a bug

reformat code