make sure hash is decode correctly