try to handle spills correctly: not quite there yet