Multiple bugfixes, implemented new fence approach (HIGHLY UNSTABLE)