Javascript fixes

![thanks for the fixed img, lukey](http://media2.giphy.com/media/11YBEjBO3uP20g/giphy.gif)