fixing hasUnionMarker with adding sort info