Fixes for deleting images/videos not being removed from the media database.