ULib fix - substitute for #1083

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