#4111 Merge changes from 5.7