fixed null pointer given to strcmp