Fix bug where only a single error was being thrown if there were multiple errors. Thanks j201