Add initial fence code