Remove duplicate code in previous commit