Fixing error message call