Fixed the annoying obscure crash... Guess those debug messages were helpful after all!