Style changes and bug fix