[duim,tests] Fix gadget tests.

Fix by @fracek.