Merge pull request #5013. Fix #2454 in master
import lost exceptions
Merge pull request #5319
Merge pull request #5319 in develop