Some bug fix, update build