fix for #2287 on Winodows