fix compare with leading 0 on directory mode