fix reading from hash