minor front-end javascript fixes