various fixes .. see PR comments