Refactor to remove strange duplication behavior