Fix runtime errors with blocks.