Correct JavaScript references