Reverted js to correct error