better ul clear logic