Added the code for the -a option, which was missing (?!).