At the suggestion of Adam, I've changed to a get_and_create, so as to avoid race conditions