Switch statement no longer duplicates