correct few minor chapter 3 javascript errors