Fixed buffer errors.