Fix add() bug

Fix bug that crashes ctg if a string is given as a priority.