Problem from laws of motion

both block and wedge are of mass m . Question is to find acceleration of wedge and block .

I can understand how to solve it taking wedge as frame of reference .

but when am trying to find solution taking ground as frame of reference and finding their acceleration different .

the answer should be

acceleration of wedge =[ gsin(theta)cos(theta) ] / ( 1 + sin^2 (theta) )
acceleration of block = big one

My approach to solve it wrt ground frame of reference :

For block  : gsin(theta ) is acceleration
Normal Force = mg cos (theta)

For wedge : g cos (theta ) sin (theta) = acceleration

But a should come as I said earlier . Where am I wrong ?