major bugfixes