Fixed setting buffer to half of the size