added missing buffer size fix