Fix reference creation in a way that make Monodevelop happy