fix undefined $url notice
check if default is set