fix URL generation problem when updating