CES First order Condition with two labour types

I am struggling to derive a first order in this model with Cobb-Douglas production function and CES labour aggregator with two types labour (here male and female, but could be equally low and high skill).

Setup: Cobb-Douglas production function $$Y = A K^{\alpha}L^{(1-\alpha)} \tag{1}\label{1}$$ where $$K$$ is capital and $$L$$ is labor, and $$A$$ the TFP. There are two types of labor $$i \in \{F,M\}$$ that are aggregated with constant elasticity of substitution $$L = \left[(1-\lambda) (a_M M)^{\frac{\sigma-1}{\sigma}} +\lambda(a_F F)^{\frac{\sigma-1}{\sigma}} \right]^{\frac{\sigma}{\sigma-1}} \tag{2}\label{2}$$ where $$\sigma$$ represents elasticity of substitution between $$M$$ and $$F$$, $$a_M$$ and $$a_F$$ are productivity terms, and $$\lambda$$ is the share parameter. Combining these two equations gives $$Y = A K^{\alpha} \left[(1-\lambda) (a_M M)^{\frac{\sigma-1}{\sigma}} +\lambda(a_F F)^{\frac{\sigma-1}{\sigma}} \right]^{\frac{(1-\alpha)\sigma}{\sigma-1}} \tag{3}\label{3}$$

Solution: Setting marginal products of labour equal to wage should give $$W^{F} = (1-\alpha)\lambda a_F A K^{\alpha} (a_FF)^{-\alpha} \times \left[ (1-\lambda) \left( \frac{A_MM}{a_FF}\right)^{\frac{\sigma-1}{\sigma}}+\lambda \right]^{\frac{(1-\alpha)\sigma}{\sigma-1}-1} \tag{4.1}\label{4.1}$$ $$W^{M} = (1-\alpha)(1-\lambda) a_M A K^{\alpha} (a_MM)^{-\alpha} \times \left[ (1-\lambda) \left( \frac{A_FF}{a_MM}\right)^{\frac{\sigma-1}{\sigma}} \right]^{\frac{(1-\alpha)\sigma}{\sigma-1}-1} \tag{4.2}\label{4.2}$$

Steps: So, I wanted to get the foc of equation $$\eqref{3}$$ to get the marginal product of each type of labor and doing double chain rule for each powered bracket, but my result seems not to simplify to what it should. $$\frac{\partial Y}{\partial F} = (1-\alpha) \lambda a_F A K^{\alpha} (a_FF)^{\frac{-1}{\sigma}} \times \left[(1-\lambda) (a_MM)^{\frac{(\sigma-1)}{\sigma}} + \lambda(a_FF)^{\frac{(\sigma-1)}{\sigma}} \right]^{\frac{(1-\alpha)\sigma}{\sigma-1}-1}$$

Edit: Edited the FoC for the mistake. And to close this, I am putting here the simplification as suggested in the answer (hopefully without typos): $$= (1-\alpha) \lambda a_F A K^{\alpha} (a_FF)^{\frac{-1}{\sigma}} \times \left[\left((1-\lambda) (a_MM)^{\frac{(\sigma-1)}{\sigma}} + \lambda(a_FF)^{\frac{(\sigma-1)}{\sigma}}\right) \times \frac{(a_FF)^{\frac{(\sigma-1)}{\sigma}}}{(a_FF)^{\frac{(\sigma-1)}{\sigma}}} \right]^{\frac{(1-\alpha)\sigma}{\sigma-1}-1}$$

$$= (1-\alpha) \lambda a_F A K^{\alpha} (a_FF)^{\frac{-1}{\sigma}} \times \left[(1-\lambda) \left(\frac{A_MM}{a_FF}\right)^{\frac{\sigma-1}{\sigma}}+ \lambda \right]^{\frac{(1-\alpha)\sigma}{\sigma-1}-1} \times (a_FF)^{\frac{1-\alpha \sigma}{\sigma}}$$

$$= (1-\alpha)\lambda a_F A K^{\alpha} (a_FF)^{-\alpha} \times \left[ (1-\lambda) \left( \frac{A_MM}{a_FF}\right)^{\frac{\sigma-1}{\sigma}}+\lambda \right]^{\frac{(1-\alpha)\sigma}{\sigma-1}-1}$$

Sources: Cahuc, P., Carcillo, S., & Zylberberg, A. (2014). Labor economics. MIT press. Chapter 3

Acemoglu, D., Autor, D. H., & Lyle, D. (2004). Women, war, and wages: The effect of female labor supply on the wage structure at midcentury. Journal of political Economy, 112(3), 497-551.

Simply multiply and divide one $$\left(a_{F} \boldsymbol{F}\right)^{\frac{(\sigma-1)}{\sigma}}$$ in the bracket and then take one outside the bracket. And by the way your FOC is incorrect in that $$\frac{\sigma}{(\sigma-1)}$$ should be cancelled out.