Fix/large email queries 2

@jbau