Fix maxBuffer error

Change spawn method on exec and set maxBuffer