small improvements and fixes