fix error with exception - not completely work yet