fix a spot where an error was not properly returned