add a couple of error handlers