Modified auto close message function with default second value
Minor typo fixes