ULib fix - substitute for #1083

With this changes the tests pass again...

https://github.com/hamiltont Hope that it can be work! Thank you.

Stefano