fix problems reported in pr review