bugfixes that I lost somehow