Fixes from Petr

@pwalczysko spotted these 2 minor issues on #422, which was a rebased PR made using snoopy, so I'm fixing them separately here.