fixed some buffer bugs