Some bugfixes!