Fixing minor js issues