merged from googlecode r979