Reverting the broken javascript