Removed unnecessary argument in clearMessges().