some bugfixes.