   # to add a new group to a flag
   #
   post "/flags/:name/groups" do
-    flag_name = String.to_atom(name)
+    flag_name = String.to_existing_atom(name)
     group_name = Utils.sanitize(conn.params["group_name"])
 
     case Utils.validate(group_name) do

  # to add a new actor to a flag
  #
  post "/flags/:name/actors" do
    flag_name = String.to_atom(name)
    actor_id = Utils.sanitize(conn.params["actor_id"])

    case Utils.validate(actor_id) do

  #
  patch "/flags/:name/boolean" do
    enabled = Utils.parse_bool(conn.params["enabled"])
    flag_name = String.to_existing_atom(name)

    if enabled do
      FunWithFlags.enable(flag_name)
