changed line 336 from error to fail