fix length method
only add debugging info for ArgumentErrors