added check for null terminator in url box