JS function tweak, thank, @nathan!