types+grammar: oops, code bug fixed