Minor correction and bug fix