Fixed various stacktraces, including issue #55