validate and fix urls