fixing a bug on exception handling