Handle end of streams, correctly find Blocks/SimpleBlocks