changing Popup hide function to 'remove', which exists