Fix a couple duplication bugs