Fixed printf problems when output contains a %