diff --git a/userpoints.module b/userpoints.module
index c39331b..e591b04 100644
--- a/userpoints.module
+++ b/userpoints.module
@@ -706,7 +706,7 @@ function userpoints_userpointsapi($params) {
         ))));
   } //if $params['status']
 
-  if ($mesg && (!empty($params['display']) || (empty($params['display']) && variable_get(USERPOINTS_DISPLAY_MESSAGE, 1) == 1))) {
+  if ($mesg && ($params['display'] || ($params['display'] === NULL && variable_get(USERPOINTS_DISPLAY_MESSAGE, 1) == 1))) {
     drupal_set_message($mesg);
   }
   // Call the _userpoints hook to allow modules to act after points are awarded
