Merged with latest(26/07/2013) upstream changes.