Fixed issue with working out if url is safe or not