JH: more fixes