DrawRect dissapear when use chat.

Hi everyone. I have this code in my weapon:

[lua]function SWEP:DrawHUD()
if self.IsCracking then
surface.SetDrawColor( 255, 0, 0, 255) --Red
surface.DrawRect(ScrW()/2-(self.WillEndCrack - CurTime()) , ScrH()/2-50,(self.WillEndCrack - CurTime()) , 50 )
end
end[/lua]

It works good but when I open chat it dissapear. Any idea?

The chat probably disables SWEP:DrawHUD when its open.