Fixes #2567

This is how WP does it internally