style and db query change

used insert ignore to ignore already existing key combo. ie: when
replacing the action in slot 1 with something else.