Chirpstack class B ping slot timings

i am encountering problems implementing class b in my custom device.
I can successfully receive beacons, but whenever i send pings with chirpstack i see that timings are completely desynchronized between the sending and the device rx window opening. If i enlarge the rx window a lot (i am talking about seconds) i can successfully receive the downlink in the ping slot.
I looked both at chirpstack source code and lorawan class b specifications, and procedures and formulas used to calculate the first random slot are the same, and also other seems to be correct.
What else could i check? Are there any reported bugs or issues on lorawan class b in chirpstack?
Thank you very much,
Best regards

Did you confirm that your device has synchronized its time correctly using the DeviceTimeReq / Ans mac-command?