Fixed bugs that appeared with the merging