Fix warnings

Add assertion after url construction