String's memory allocation and comparison bug fixed.