Fix bug in whitelist when custom whitelist is empty