Fixed all the js issues