Second attempt at fixing select duplication