fixed bug with -f option