fix a bug of strncmp