added closing of media overlay after saving