handle a few errors