small fixes. new tests