Debug assertion fix