fixes for #570 PR