fixed changing main based on secondory selection