bugfixes (d6 to d7)