Fix debug assertion