diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 8957633ec7..69d764b7aa 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2082,7 +2082,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
}
$on_page = floor($start_item / $per_page) + 1;
- $url_delim = (strpos($base_url, '?') === false) ? '?' : '&';
+ $url_delim = (strpos($base_url, '?') === false) ? '?' : ((strpos($base_url, '?') === strlen($base_url) - 1) ? '' : '&');
$page_string = ($on_page == 1) ? '1' : '1';
@@ -2949,7 +2949,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_LOGIN);
- $captcha->reset();
+ // $captcha->reset();
$template->assign_vars(array(
'CAPTCHA_TEMPLATE' => $captcha->get_template(),