Small bugfixes and typo error