Possible fix for 'invalid buffer' bug