types+grammar: more fixes per #170