Fixing loss of specialization after clear and resize.
Merge branch 'dev'