fix broken mail output