make esqueleto query getMessages work