clean up a couple of edge cases