fix http://youtrack.animatron.com/youtrack/issue/EDIT-3964
fix EDIT-3964, addition
Merge branch 'master' into trying-optimisations