bug fix, str should be cleared of previous data to 
prevent fall through of previous result