Fix scoping of dollar symbol and only change icon of selected item on publish/unpublish