Refined tests and fixed a specialization init bug.