Added some security around the topic inputs.