Fixed a bug due to using strncmp instead of memcmp (ahem).