Many commits from 3.x are missing in 4.x branch. - rebase 4.x branch with 3.x - fix issues and make all tests passed