Fix warning when scopes and limits are used