applied patch v0.4d on trunk