fix testing on errors