Fix whitelist functionality