fixed main and plane issue