How to make an if loop run more than once

I have some if loops that only runs once and stops. How would I get them to run everytime the condition happens?

<CsoundSynthesizer>

<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-+rtmidi=NULL -M0 -Q0 ;;;RT audio I/O with MIDI in
; For Non-realtime ouput leave only the line below:
; -o midiin.wav -W ;;; for file output any platform
</CsOptions>

<CsInstruments>

sr        =  44100
ksmps     =  10
nchnls    =  1

massign         0, 130 
pgmassign       0, 130  

instr   130

kstatus, kchan, kdata1, kdata2                  midiin


if (kstatus == 144 && kdata1%12==0 &&kdata2>0 ) then


outkpb 1, 70, -200, 200

endif
if (kstatus == 144 && kdata1%12==1 &&kdata2>0 ) then


outkpb 1, 30, -200, 200

endif

  endin

</CsInstruments>

<CsScore>
i130 0 3600
e
</CsScore>


</CsoundSynthesizer> 



This is my code. When I check the output from the midi monitor, the first time I press a C or a C# i see the pitch bend message on the console but nothing happens the second time around.