fixes of discovered bugs