Fixes to gadgets