Fixed some cross-compatibility issues