bugfixes and compatibility