various fixes and additional checks to filter out unrealizable paths