Submitted by: "KATO Tsuguru" <tkato@prontomail.ne.jp>
Closes PRs 1801, 2029, 2059. Submitted by: Yukihiro Nakai <Nakai@Mlab.t.u-tokyo.ac.jp>