PreparedQueryObject queryObject = new PreparedQueryObject();
         queryObject.appendQueryString(selectQuery);
                ResultSet rs = dsHandle.executeOneConsistencyGet(queryObject);
-               System.err.println(rs);
-               
                return rs.one().getLong("count");
        }
-       
-       
+
+
        /**
-        * This method returns the top of lock table/queue for the key. 
-        * @param keyspace of the application. 
-        * @param table of the application. 
+        * This method returns the top of lock table/queue for the key.
+        * @param keyspace of the application.
+        * @param table of the application.
         * @param key is the primary key of the application table
         * @return the UUID lock reference.
         * @throws MusicServiceException
 
         String table = splitString[1];
         String primaryKeyValue = splitString[2];
         try {
-            return getLockingServiceHandle().peekLockQueue(keyspace, table, primaryKeyValue)+"";
+            return getLockingServiceHandle().peekLockQueue(keyspace, table, primaryKeyValue).lockRef;
         } catch (MusicLockingException | MusicServiceException | MusicQueryException e) {
                logger.error(EELFLoggerDelegate.errorLogger,e.getMessage(), AppMessages.LOCKINGERROR+fullyQualifiedKey ,ErrorSeverity.CRITICAL, ErrorTypes.LOCKINGERROR);
         }