add some bugfixes