more exception handling fixes