Fixed some naive js