style and bug fix