Fix whitelist check