fix typos and update to 3.1