Fixed a bug in Task1 with incorrect buffer size