Fix group assignment when importing