Fix for #146 as well as broken grouping when in remote mode with more than 2 groups.