fixed a crashed when creating a spec without having one selected previously