minor fixes related to some exceptions scattered