fix compatibility issues