Fixed bug in handling corner cases (literally) for spill. Added tests.