Revert to old js code