Fix for the relations not disappearing; also relations now get properly deleted. However this may introduces crashes so please test a lot.