bugfixes and compatibility issues