fix double on_open call
add a workaround for EPERM issue on windows
0.13.1