Remove duplicate code after merge