added a few error handlers