fixed OnWhitelist handling