Replaced strcmp with strncmp