Fix search for first available block.