JavaScript corrections