Corrected double usage of variable