various bugfixes'