Fix variable assignment error