fixed bug in mail command