several small improvements