Fix exception handling properly after actually understanding the bug...