minor bugfixes
some bugfixes and added features