buffer short copy fix