Fix minor js issues