Some bug fix