merge with latest from 4.0