Bugfix for displaying success page in JS