(#1339) - prevent hangs on erros

@nolanlawson as promised