diff --git a/alsa-seq.cabal b/alsa-seq.cabal
--- a/alsa-seq.cabal
+++ b/alsa-seq.cabal
@@ -1,5 +1,5 @@
 Name:           alsa-seq
-Version:        0.6.0.1
+Version:        0.6.0.2
 Author:
   Henning Thielemann <alsa@henning-thielemann.de>,
   Dylan Simon <dylan@dylex.net>,
diff --git a/src/Sound/ALSA/Sequencer/Event.hs b/src/Sound/ALSA/Sequencer/Event.hs
--- a/src/Sound/ALSA/Sequencer/Event.hs
+++ b/src/Sound/ALSA/Sequencer/Event.hs
@@ -172,7 +172,7 @@
   checkResult "inputPending" =<< snd_seq_event_input_pending h (if fill then 1 else 0)
 
 foreign import ccall unsafe "alsa/asoundlib.h snd_seq_event_input_pending"
-  snd_seq_event_input_pending :: Ptr Seq.Core -> Int -> IO C.CInt
+  snd_seq_event_input_pending :: Ptr Seq.Core -> C.CInt -> IO C.CInt
 
 
 
diff --git a/src/Sound/ALSA/Sequencer/Marshal/Address.hsc b/src/Sound/ALSA/Sequencer/Marshal/Address.hsc
--- a/src/Sound/ALSA/Sequencer/Marshal/Address.hsc
+++ b/src/Sound/ALSA/Sequencer/Marshal/Address.hsc
@@ -28,8 +28,8 @@
 
 
 instance Storable T where
-  sizeOf _    = #{size snd_seq_real_time_t}
-  alignment _ = #{alignment snd_seq_real_time_t}
+  sizeOf _    = #{size snd_seq_addr_t}
+  alignment _ = #{alignment snd_seq_addr_t}
   peek p      = do cl <- #{peek snd_seq_addr_t, client} p
                    po <- #{peek snd_seq_addr_t, port} p
                    return Cons { client = cl, port = po }
diff --git a/src/Sound/ALSA/Sequencer/Marshal/Event.hsc b/src/Sound/ALSA/Sequencer/Marshal/Event.hsc
--- a/src/Sound/ALSA/Sequencer/Marshal/Event.hsc
+++ b/src/Sound/ALSA/Sequencer/Marshal/Event.hsc
@@ -395,7 +395,7 @@
   , (#{const SND_SEQ_EVENT_START},       peekQueueEv  QueueStart)
   , (#{const SND_SEQ_EVENT_CONTINUE},    peekQueueEv  QueueContinue)
   , (#{const SND_SEQ_EVENT_STOP},        peekQueueEv  QueueStop)
-  , (#{const SND_SEQ_EVENT_SETPOS_TICK}, peekQueueExt QueueSetPosTick #{peek snd_seq_ev_queue_control_t, param.time.tick})
+  , (#{const SND_SEQ_EVENT_SETPOS_TICK}, peekQueueExt QueueSetPosTick #{peekintfield snd_seq_ev_queue_control_t, param.time.tick})
   , (#{const SND_SEQ_EVENT_SETPOS_TIME}, peekQueueExt QueueSetPosTime #{peek snd_seq_ev_queue_control_t, param.time.time})
   , (#{const SND_SEQ_EVENT_TEMPO},       peekQueueExt QueueTempo      #{peek snd_seq_ev_queue_control_t, param.value})
   , (#{const SND_SEQ_EVENT_CLOCK},       peekQueueEv  QueueClock)
@@ -657,9 +657,9 @@
 
 peekExtEv :: ExtEv -> Ptr Data -> IO Data
 peekExtEv e p = do
-  len <- #{peek snd_seq_ev_ext_t, len} p
+  len <- #{peekintfield snd_seq_ev_ext_t, len} p
   ptr <- #{peek snd_seq_ev_ext_t, ptr} p
-  fmap (ExtEv e) $ B.packCStringLen (ptr,len)
+  fmap (ExtEv e) $ B.packCStringLen (ptr, fromIntegral len)
 
 
 data Data
diff --git a/src/Sound/ALSA/Sequencer/Marshal/Template.h b/src/Sound/ALSA/Sequencer/Marshal/Template.h
--- a/src/Sound/ALSA/Sequencer/Marshal/Template.h
+++ b/src/Sound/ALSA/Sequencer/Marshal/Template.h
@@ -29,3 +29,15 @@
     hsc_intfieldtype(r,f); \
     printf (" }\n"); \
     printf (" deriving (Show, Eq, Ord, Ix, Storable)\n");
+
+#define hsc_peekintfield(t, f) \
+    printf ("(\\hsc_ptr -> peekByteOff hsc_ptr %ld :: IO ", \
+            (long) offsetof (t, f)); \
+    hsc_intfieldtype(t,f); \
+    printf (")");
+
+#define hsc_pokeintfield(t, f) \
+    printf ("(\\hsc_ptr -> pokeByteOff hsc_ptr %ld :: ", \
+            (long) offsetof (t, f)); \
+    hsc_intfieldtype(t,f); \
+    printf (" -> IO ())");
