Fix bugs with unhandled exception handling.

Safari and IE stop on these lines because of some weird behaviour.

![screen shot 2013-07-19 at 12 49 52](https://f.cloud.github.com/assets/574696/825032/e0373b52-f058-11e2-9857-75b3f0991f2b.png)