Fix little bug with buffer