working copy. bugfixes