fix bug in query delay mail