fix media editor JS error