Added improvements for handling exception cases