Fixing whitelisting bug