fix for new page create with directories