Fixed broken javascript