Fixed double exception handling