Updated check

Switched to a more logical check