Fixed bug #1. Buffer now functions as designed.