Fixed interactive JavaScript bug