Plugin system not casting properly - C#