fixed 'purgeBuffers' method (didn't update array length before)