fix bug on end of sstream crash due to "has not method end()"