Fixed variable assignment error