Fixing wrong url arg checking logic