proper url handling, no more undef chunk