Added whitelisting to message handler