Fixing misnamed variable assignment