Force add <cd> if not set

fix #1811