Removing the Uint8Array check, since IE 9 and below are probably out of scope anyway. This also prevents the code from taking a path that does not fill the buffer variable.