turns out we need this code to detect fences