Remove unused $temp scalar