This should be correct.
That is a strange design: you are essentially shorting the rail to ground at very high speed.