Unity creates unreachable navmesh. How can I remove it?

When generating NavMesh in unity I have blocks/cubes that are solid. My expectation would be that navmesh go around these cubes. But instead navmesh is generated inside of them.

When I spawn enemies I generate random vector position within a sphere and check with NavMesh.SamplePosition if this is a valid spot on the navmesh. However this can spawn enemies within these cubes.

Am I missing something? Is this how it should work.

alt text

A little late, but you should simply select the unreachable areas and set their Navigation Area (under Object tab) from walkable to not walkable.

did you fixed it ? i have some problem.