fixing broken js