removed faulty logic with swaps and the bug it created with active gadgets