typos and bugfixes