Immediately after switching the page, it will work with CSR.
Please reload your browser to see how it works.
Also, make sure that your patch does not introduce a secure vulnerability as math/rand output is not suitable for anything security related.