Fix #13964

Fixes #13964.
To: @mdo for a quick review