Fixed memcmp bug