JavaScript bug fix.