fixed some minor js issues