The render template master details not working well