fixed some potential js syntax problems that webstorm was freaking out about