Cast to custom HUD fails

The title pretty much explains it. Inside the level blueprint I am getting a HUD from the player controller and trying to cast it to my custom HUD class. Up until now it always worked but all of a sudden it doesn’t. What could be the problem here?

Resolved. Somehow my gamemode got changed, I changed it back.

what did u change it to ?

In my WorldSettings → GameMode I have switched the HUD-Class back to my custom HUD-Class