Style fix and bug fix