fixed undefined offset for url array