Corrected local variable error