100% coverage and bugfixes