fix jpeg script