Fix bad copy, unused variable