Merged changes of v0.4 branch on master