necessary bugfixes