fix undefined url issue in watch