Fixing error value overriding issue.