fixed some bugs
resolve conflicts