Updated logic to remove an error.