fixing conditional syntax problem identified by @wkelly