Fixed clearing problem