add wolv's new unit test, fix setting lastEntry and an off by one on the size