Refactoring: use safer hash fetch