fixed small bug in auto emailer