fixed bug where history would return null values if buffer wasnt full