fixed assignment of pin in typechecker