This limits buffer size

Hope you like it @georgeye