fix setcookie in media library