also made it optimistic, rely on exceptions instead of copmlex if chains (cherry picked from commit 11dbed1350)
11dbed1350