Fixing #186. Generate q_name when adding new sp.