Fix deprecated access to hash as hashref