fix hooks error in windows