Revert "simplified check"

This reverts commit 6fe0cb0c9c1e1e95f8d12f2b8283e3b027a8b455.