fixed undefined url issue