Made some small fixes to the js