Ensuring that length is cast as an int when adding len(data)

See commit comment below. :)