Properly pre-populate search terms from URL