Pull in ohardy's changes

Simple bug fix for length checks