Fixed handling of binaries

I guess things like this are going to cause problems with large binaries right?