diff --git a/CHANGELOG b/CHANGELOG
index 981fd0e77abfadb8ebe6a0cc724110dd165f5310..2e5cd78c8a8a7c9bf099c519fecf9e6d4ab2a1bc 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+v 6.5.1
+  - Fix branch selectbox when create merge request from fork
+
 v 6.5.0
   - Dropdown menus on issue#show page for assignee and milestone (Jason Blanchard)
   - Add color custimization and previewing to broadcast messages
diff --git a/VERSION b/VERSION
index f22d756da39d4c5f688b56060df98ea326cc0376..a194c18e86e8852fe64f3912531362eadf6fe055 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-6.5.0
+6.5.1
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 0792dbf041f35c1c511d2d4e2fd77e2be59d8151..c66f3de6263a77389f183e208f7388dff148aec4 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -152,6 +152,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
     @target_project = selected_target_project
     @target_branches = @target_project.repository.branch_names
     @target_branches
+
+    respond_to do |format|
+      format.js
+    end
   end
 
   def ci_status
diff --git a/app/views/projects/merge_requests/update_branches.js.haml b/app/views/projects/merge_requests/update_branches.js.haml
index 6a21551e811cfae63db3ed8b536f0d28b7b426de..ca21b3bc0deb365c4db2f3ecc72576c80cd5e4e4 100644
--- a/app/views/projects/merge_requests/update_branches.js.haml
+++ b/app/views/projects/merge_requests/update_branches.js.haml
@@ -1,5 +1,9 @@
 :plain
   $(".target_branch").html("#{escape_javascript(options_for_select(@target_branches))}");
-  $(".target_branch").trigger("select2:updated");
+
+  $('select.target_branch').select2({
+    width: 'resolve',
+    dropdownAutoWidth: true
+  });
+
   $(".mr_target_commit").html("");
-  $(".target_branch").trigger("change");
diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab
index cb2db44c97c4faa432de2bdbb2948389624616dd..5e4314bdec028f678b8d5671cb919dd3ef47d86e 100755
--- a/lib/support/init.d/gitlab
+++ b/lib/support/init.d/gitlab
@@ -39,6 +39,11 @@ sidekiq_pid_path="$pid_path/sidekiq.pid"
 # Read configuration variable file if it is present
 test -f /etc/default/gitlab && . /etc/default/gitlab
 
+# Not all systems set $USER
+if [ "x$USER" = "x" ]; then
+  USER=$(id -nu)
+fi
+
 # Switch to the app_user if it is not he/she who is running the script.
 if [ "$USER" != "$app_user" ]; then
   sudo -u "$app_user" -H -i $0 "$@"; exit;
@@ -96,16 +101,16 @@ check_pids
 ## Checks whether the different parts of the service are already running or not.
 check_status(){
   check_pids
-  # If the web server is running kill -0 $wpid returns true, or rather 0.
+  # If the web server is running ps -p $wpid returns true, or rather 0.
   # Checks of *_status should only check for == 0 or != 0, never anything else.
   if [ $wpid -ne 0 ]; then
-    kill -0 "$wpid" 2>/dev/null
+    ps  -p "$wpid" 2>&1 1>/dev/null
     web_status="$?"
   else
     web_status="-1"
   fi
   if [ $spid -ne 0 ]; then
-    kill -0 "$spid" 2>/dev/null
+    ps  -p "$spid" 2>&1 1>/dev/null
     sidekiq_status="$?"
   else
     sidekiq_status="-1"
@@ -280,7 +285,8 @@ case "$1" in
         start
         ;;
   stop)
-        stop
+        # Some systems, e.g. Illumos have an alias for stop in /bin/sh that prevents the call to the stop function
+        \stop
         ;;
   restart)
         restart