Bug fixes, further improved debug info/stack traces