fixing bugs caused by merge