fixed a crash when duplicating a spec while having none selected