Merge latest changes from defaeult branch into 0.3 branch.