Fixed bugs rising from the merge