Bugfixes and other little things