port to 1.4.7