handling exception fixes