Fix for outofmemory error. This was due to issue netty/netty#1393