bug fix & clean