fix to -r option