some minor changes to js