Fix querSelector of null error.