wrong function optimize directory [ci skip]