remove superfluous js, fix destroy stack error with redirect