diff --git a/BepInEx/Contract/Attributes.cs b/BepInEx/Contract/Attributes.cs
index eda4415..ca40441 100644
--- a/BepInEx/Contract/Attributes.cs
+++ b/BepInEx/Contract/Attributes.cs
@@ -159,7 +159,7 @@ namespace BepInEx
///
/// The plugin instance.
/// The BepInPlugin metadata of the plugin instance.
- public static BepInPlugin GetMetadata(object plugin) => GetMetadata(plugin.GetType());
+ public static BepInPlugin GetMetadata(object plugin) => GetMetadata(plugin as BaseUnityPlugin);
///
/// Gets the specified attributes of a type, if they exist.