How fire interacts with habitat fragmentation