Improve warning
Fixed #1768