Reapply fix made in #655
Merge develop into api-filter