Revert "Fix #1517"

This reverts commit dba4d5c5ca9e807c7ea61105e74f994eda99fc3b.
Fix #1517 another way