bug fix and some add