As it was before, the value "secret" in "secret_key" and "jegacy_jwt_secret" would be replaced by the key generated for "secret". This reduced the security of the keys as all three keys would be almost the same. By moving the command for secret to the bottom, this problem no longer occurs.