fixing some bugs with media modal