a bunch of small adjustments/bugfixes