diff --git a/lib/apns/notification.rb b/lib/apns/notification.rb
index <HASH>..<HASH> 100644
--- a/lib/apns/notification.rb
+++ b/lib/apns/notification.rb
@@ -19,7 +19,7 @@ module APNS
     def packaged_notification
       pt = self.packaged_token
       pm = self.packaged_message
-      [0, 0, 32, pt, 0, pm.size, pm].pack("ccca*cca*")
+      [0, 0, 32, pt, 0, pm.bytesize, pm].pack("ccca*cca*")
     end
   
     def packaged_token
fixed payload length to send multibyte messages