Fixing faulty check

This might not actually fix the original problem, but it might improve
functionality, MIGHT