Fixed error when using -a option