some bugfixes and fixes #2