More tests and fix max_ext_len.