merge 0.4.x into 0.6.x