Fix range checking in Hist[]

This fixes #275