Failed hashing returns -1