small fixes for #5320
Merge pull request #20 from ivanov/5320-last-thing

small fixes for #5320