Issue 3966 master merge