Some bugfixes...