Cleaning and bug fix.