Final escape algorithm bugfixes