VE-1044: Fix for bunch of tests - work in progress - have to be reviewed.