fixing clear operation