ported fixes