some bugfixes, mostly for divisors