clearBuffer working correctly