fix check for mail at start-up