adding in fixes if topic is not defined when adding a post