added patch for missing media function