Zend certified PHP/Magento developer

Why can’t I use between function to slow down video with ffmpeg?

When I use this code:

ffmpeg -i a.mp4 -filter:v "setpts='if(between(T,3,5),PTS*3,PTS)'" -b:v 3000k -s 1440x720 d.mp4

I get output which stops at 3rd second and run in slow motion from 9th second, and ends somewhere at 14th. Rescaling and changing bitrate doesn’t affect this. No warnings shown at output. So why it freezes output for 6 seconds?