ensure topic is stored as an integer