Fix for .net 4.0