String compare bug fixed