clean and bug fix