Fixing execution when directories are empty.