fixing bug when only one dir is periodic