fix some exceptions