Rearrange caption input. #380. #381.
Merge.