[#1841] tests and fixes