Fix redirection bug and add JS to p6 & p9