Oc 3967 travis

This PR fixed the problem with the Travis failure and solved the problem with some of the unit tests.
This PR is duplicated because in the previous one it seems that Travis is building twice the PR.