Some tiny bugfixes