fixed broken -k option