Fixed error when having whitelist enabled.