(1) Changed memory assignment for TMs in YARN mode. (2) Fixed some minor bugs.