Fixed issues with inbound email handling