Resolved merge conflict and fixed one bug