Hello Max, I have the exact same problem as you and came across your post. It's been over a year, so I hope you still receive this message and remember what you did.
Can you tell me where exactly where you put that delay at? And did you use a function from one of the C libraries or did you do something else? Thanks.