Fix assert failure