Bughunting:

several small improvements