diff --git a/rabbitmq-server-ha b/rabbitmq-server-ha
index 227035b..37167fb 100755
--- a/rabbitmq-server-ha
+++ b/rabbitmq-server-ha
@@ -1,4 +1,5 @@
 #!/bin/sh
+set -x
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -30,7 +31,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 OCF_RESKEY_binary_default="/usr/sbin/rabbitmq-server"
 OCF_RESKEY_ctl_default="/usr/sbin/rabbitmqctl"
-OCF_RESKEY_debug_default=false
+OCF_RESKEY_debug_default=true
 OCF_RESKEY_username_default="rabbitmq"
 OCF_RESKEY_groupname_default="rabbitmq"
 OCF_RESKEY_admin_user_default="guest"
@@ -595,7 +596,7 @@ master_score() {
         score=0
     fi
     ocf_log info "${LH} Updating master score attribute with ${score}"
-    ocf_run crm_master -l reboot -v $score || return $OCF_ERR_GENERIC
+    ocf_run crm_master -N $THIS_PCMK_NODE -l reboot -v $score || return $OCF_ERR_GENERIC
     return $OCF_SUCCESS
 }
 
@@ -660,7 +661,8 @@ get_node_master_score() {
 
 # Return either rabbit node name as FQDN or shortname, depends on the OCF_RESKEY_use_fqdn.
 rabbit_node_name() {
-    echo "rabbit@$(process_fqdn $1)"
+    #echo "rabbit@$(process_fqdn $1)"
+    echo "rabbit@$(process_fqdn $(ocf_attribute_target $1))"
 }
 
 rmq_setup_env() {
@@ -673,7 +675,8 @@ rmq_setup_env() {
     MNESIA_FILES="${OCF_RESKEY_mnesia_base}/$(rabbit_node_name $H)"
     RMQ_START_TIME="${MNESIA_FILES}/ocf_server_start_time.txt"
     MASTER_FLAG_FILE="${MNESIA_FILES}/ocf_master_for_${OCF_RESOURCE_INSTANCE}"
-    THIS_PCMK_NODE=`crm_node -n`
+    #THIS_PCMK_NODE=`crm_node -n`
+    THIS_PCMK_NODE=$(ocf_attribute_target)
     TOTALVMEM=`free -mt | awk '/Total:/ {print $2}'`
     # check and make PID file dir
     local PID_DIR=$( dirname $OCF_RESKEY_pid_file )
@@ -789,6 +792,7 @@ unblock_client_access()
     done
 }
 
+# FIXME: 
 get_nodes__base(){
     local infotype=''
     local rc=$OCF_ERR_GENERIC
@@ -823,6 +827,7 @@ get_running_nodes() {
 }
 
 # Get alive cluster nodes in visible partition, but the specified one
+# FIXME:
 get_alive_pacemaker_nodes_but()
 {
     if [ -z "$1" ]; then
@@ -955,6 +960,14 @@ trim_var(){
     echo ${string%% }
 }
 
+bandini(){
+    FUCK=""
+    for n in $1; do
+	FUCK="$FUCK $(ocf_attribute_target $n)"
+    done
+    echo $FUCK
+}
+
 action_validate() {
     # todo(sv): validate some incoming parameters
     OCF_RESKEY_CRM_meta_notify_post=$(trim_var $OCF_RESKEY_CRM_meta_notify_post)
@@ -965,17 +978,17 @@ action_validate() {
     OCF_RESKEY_CRM_meta_notify_stop_resource=$(trim_var $OCF_RESKEY_CRM_meta_notify_stop_resource)
     OCF_RESKEY_CRM_meta_notify_active_resource=$(trim_var $OCF_RESKEY_CRM_meta_notify_active_resource)
     OCF_RESKEY_CRM_meta_notify_inactive_resource=$(trim_var $OCF_RESKEY_CRM_meta_notify_inactive_resource)
-    OCF_RESKEY_CRM_meta_notify_start_uname=$(trim_var $OCF_RESKEY_CRM_meta_notify_start_uname)
-    OCF_RESKEY_CRM_meta_notify_stop_uname=$(trim_var $OCF_RESKEY_CRM_meta_notify_stop_uname)
-    OCF_RESKEY_CRM_meta_notify_active_uname=$(trim_var $OCF_RESKEY_CRM_meta_notify_active_uname)
+    OCF_RESKEY_CRM_meta_notify_start_uname=$(bandini $(trim_var $OCF_RESKEY_CRM_meta_notify_start_uname))
+    OCF_RESKEY_CRM_meta_notify_stop_uname=$(bandini $(trim_var $OCF_RESKEY_CRM_meta_notify_stop_uname))
+    OCF_RESKEY_CRM_meta_notify_active_uname=$(bandini $(trim_var $OCF_RESKEY_CRM_meta_notify_active_uname))
     OCF_RESKEY_CRM_meta_notify_master_resource=$(trim_var $OCF_RESKEY_CRM_meta_notify_master_resource)
-    OCF_RESKEY_CRM_meta_notify_master_uname=$(trim_var $OCF_RESKEY_CRM_meta_notify_master_uname)
+    OCF_RESKEY_CRM_meta_notify_master_uname=$(bandini $(trim_var $OCF_RESKEY_CRM_meta_notify_master_uname))
     OCF_RESKEY_CRM_meta_notify_demote_resource=$(trim_var $OCF_RESKEY_CRM_meta_notify_demote_resource)
-    OCF_RESKEY_CRM_meta_notify_demote_uname=$(trim_var $OCF_RESKEY_CRM_meta_notify_demote_uname)
+    OCF_RESKEY_CRM_meta_notify_demote_uname=$(bandini $(trim_var $OCF_RESKEY_CRM_meta_notify_demote_uname))
     OCF_RESKEY_CRM_meta_notify_slave_resource=$(trim_var $OCF_RESKEY_CRM_meta_notify_slave_resource)
-    OCF_RESKEY_CRM_meta_notify_slave_uname=$(trim_var $OCF_RESKEY_CRM_meta_notify_slave_uname)
+    OCF_RESKEY_CRM_meta_notify_slave_uname=$(bandini $(trim_var $OCF_RESKEY_CRM_meta_notify_slave_uname))
     OCF_RESKEY_CRM_meta_notify_promote_resource=$(trim_var $OCF_RESKEY_CRM_meta_notify_promote_resource)
-    OCF_RESKEY_CRM_meta_notify_promote_uname=$(trim_var $OCF_RESKEY_CRM_meta_notify_promote_uname)
+    OCF_RESKEY_CRM_meta_notify_promote_uname=$(bandini $(trim_var $OCF_RESKEY_CRM_meta_notify_promote_uname))
     return $OCF_SUCCESS
 }
 
