Remove unused tmp2 variable