Fixing error return