Several bugfixes in long text.