minor style update and bug fix