fixing some JS things