Fixed test and removed unused variable