Bug Fix: toolbar being removed

make sure only the toolbar for the current instance is removed before rebuilding
correct the script for looping over the media items