Add an explicit hide() for the edit metadata dialog, though I dont see why it should be necessary. Maybe it will fix the phantom edit metadata dialog problem.