Working on SET
Fix lurking bugs.