Fixing var assignment