Fixed trycatch problem