Moving towards fixing hte javascript