fix top dir condition for windows