Fix problem reading 16-bit samples

A  slight bug is fixed in this commit to correctly read 16-bit samples.