moar fixes for pre patch