Fixed JS code that was added in last commit