fix buffer draw