merged and fixed for 4.1