Fixed admin query, fixed sending of emails to active accounts