Fixed some javascript errors I had.