Fix up js optimization.