Fix ordering of compare functions: strncmp() must be used first, a