better fix for https://nuget.codeplex.com/workitem/3435