prevent loading when spatilaindex is not enabled.