Fixed js issues