merge 0.4.x into 0.5.x