Experimantal fix for 'java.lang.IllegalArgumentException: Buffering capacity exceeded'