merge improved exceptions from 1.6 for #52 and #55