Important bugfixes