The -i option was causing an exception; this patch fixes it