fix bugs caused by merge

bugsfixes