bugfixes and implemented mike's new autorelations feature