clean up fence logic a bit