fixed buffer size on return