fixed previousHash bug