Minor changes to get rid of some exceptions.